#FROM reg.sdses.com/dev/sdses-jdk:8u332
ARG BASE_IMAGE
FROM ${BASE_IMAGE}

ENV LANG=C.UTF-8
ENV TZ=Asia/Shanghai

# 设置环境变量
#ENV spring_active_db=hg

ADD target/weather-*-SNAPSHOT.jar /opt/weather.jar
EXPOSE 7998
#环境变量 JAVA_OPTS DEBUG_OPTS JMX_OPTS SPRING_CONFIG 由k8s传入
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS $DEBUG_OPTS $JMX_OPTS -jar /opt/weather.jar --spring.config.location=$SPRING_CONFIG --spring.profiles.active=prod,$DATABASE_TYPE" ]

